% function [feat_wts] = feature_weight()
% % best_feature_count best_feature_ind
% clear all
% close all
% clc
% load act_model1.mat
% fields= {'act1','act2','act3','act4','act5'};
% model=cell2struct(act_model,fields,2);
% 
% model_length = [(length(model.act1)) (length(model.act2)) (length(model.act3)) (length(model.act4)) (length(model.act5))];
%   max_model_length= max(model_length);              
%  ind_mat= zeros(max_model_length,5);           
% for i=1: max_model_length
% % ind_mat(i,1)= model.act1{i}.ind;
% ind_mat(i,2)= model.act2{i}.ind;
% ind_mat(i,3)= model.act3{i}.ind;
% ind_mat(i,4)= model.act4{i}.ind;
% ind_mat(i,5)=model.act5{i}.ind;
% end
% 
% hist(ind_mat,39);
% title('Histogram for features');
% legend('lifttomouth','pour','scoop','unscrew cap','stir');
% 
% feature_support = hist(ind_mat,39);
% feat_wts = normalise(sum(feature_support(:,2:end),2));
% save feat_wts.mat feat_wts;
% % feature_weights = [normalise(feature_support(:,1)) normalise(feature_support(:,2)) ...
% %     normalise(feature_support(:,3)) normalise(feature_support(:,4)) ...
% %     normalise(feature_support(:,5))];
% 
% %[best_feature_count best_feature_ind]  = sort(feature_support,'descend');
% %fprintf('best features for act1= corr(wrist X,Y)  act2= energy(wrist(z))   act3= mean(wrist(Z))  act4=mean(elbow(X))  act5= var(wrist(Y)) ')
% 
% 
